<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%String path = request.getContextPath() ;%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>
<%@ taglib uri="/WEB-INF/tld/ui.tld" prefix="ui" %>
<%@ taglib uri="/WEB-INF/tld/sys.tld" prefix="sys" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>项目产品列表</title>
    <jsp:include page="../../import.jsp" flush="true" />
</head>
<body class="iframeBody">
<div class="Wrapper">
    <div>
        <div id="pageInTab" class="pageInTab">
            <div class="searchArea">
                <form id="searchBar">
                    <div class="fieldset1 clearFix">
                        <div class="clearFix"></div>
                        <div class="btnsBox">
                            <span id="searchBtn" class="sq-button sq-button-round">刷新</span>
                        </div>
                    </div>
                </form>
            </div>
            <div id="ligergrid1" class="sq-grid"></div>
        </div>
    </div>
</div>
<script type="text/javascript">
    var grid = null;
    var prjId ='${prjId}';
    var prjTypCd = '${prjTypCd}';
    var insCode = '${insCode}';
    $(function () {
        $("#ligergrid1").ligerGrid({
            url: '<%=path%>/project/cddywyq/prjPrdInitList.do?prjId='+prjId,
            method : 'get',
            columns: [
                { display: '收款人', name: 'splBankVO.rcptUnt', minWidth: 200 ,
                    enabledSort:true},
                { display: '收款账号', name: 'splBankVO.accNo', minWidth: 200 ,
                    render: function (rowdata, rowindex, value){
                        var h="";
                        if(value){
                            if(rowdata.splBankVO&&rowdata.splBankVO.audStsCd){
                                if(rowdata.splBankVO.audStsCd==FlowConstant.FLOW_CHECK_STATE_NON||rowdata.splBankVO.audStsCd==FlowConstant.FLOW_CHECK_STATE_IN){
                                    h+='<i class="ico_flasher"></i>';
                                }
                            }
                            h+=value;
                        }
                        return h;
                    },
                    enabledSort:true},
                { display: '开户银行', name: 'splBankVO.bkNm', minWidth: 200 , enabledSort:true},
                { display: '开户行号', name: 'splBankVO.bkNo', minWidth: 200 , enabledSort:true},
                { display: '金额合计', name: 'prdAmt', minWidth: 200 ,
                    totalSummary:
                        {
                            render: function (rowdata, column, cell)
                            {
                                var    h="￥" + FormatMoney((parseFloat(rowdata.sum)).toFixed(2));
                                return '<div style="color:red">总合计金额（元）:' + h + '</div>';
                            },
                            align: 'left'
                        },
                    enabledSort:true}
            ],
            pageSize:10,
            root:'rows',
            record:'total',
            hideLoadButton : true,
            width: '100%',
            height:'100%',
            heightDiff:-2,
            checkbox:true,
            rownumbers:true
        });
        grid = liger.get("ligergrid1");
        grid.setHeight(100);
        $("#searchBar").ligerForm();
        $("#searchBtn").click(function(event) {
            var form = new liger.get("searchBar");
            var data = form.getData();
            data["prjId"] = prjId;
            for (name in data){
                grid.setParm(name,data[name]);
            };
            grid.reload();
        });

        $("#pageloading").hide();
    });
    var callback = function(){
        grid.reload();
    }
    //格式化为人民币格式
    function renderAmt(rowdata, rowindex, value) {
        if(typeof value =='number'){
            var h="￥" + FormatMoney((parseFloat(value)).toFixed(2));
            return h;
        }
    }
</script>

</body>
</html>